export const btnClick = (params = null) => {
    const e = new Event('onBtnClick');
    e.params = params;
    window.dispatchEvent(e);
}

export const addBtnClickListener = (fn?: Function) => {
    window.addEventListener('onBtnClick', e => {
        console.log(e.params);
        fn && fn(e.params);
    });
}